/*
{
    "children": [
      {
        "id": "1",
        "gmtCreate": "2019-11-15 17:13:06",
        "gmtModified": "2020-09-25 13:47:54",
        "deleted": false,
        "pid": "0",
        "name": "全部数据",
        "code": null,
        "toCode": null,
        "type": 1,
        "status": null,
        "level": 1,
        "children": [
          {
            "id": "1333329957008228353",
            "gmtCreate": "2020-11-30 16:40:08",
            "gmtModified": "2020-11-30 16:40:08",
            "deleted": false,
            "pid": "1",
            "name": "权限管理",
            "code": "Acl",
            "toCode": "",
            "type": 1,
            "status": null,
            "level": 2,
            "children": [
              {
                "id": "1333330082451472386",
                "gmtCreate": "2020-11-30 16:40:38",
                "gmtModified": "2020-11-30 16:40:38",
                "deleted": false,
                "pid": "1333329957008228353",
                "name": "用户管理",
                "code": "User",
                "toCode": "",
                "type": 1,
                "status": null,
                "level": 3,
                "children": [
                  {
                    "id": "1333330741791866881",
                    "gmtCreate": "2020-11-30 16:43:16",
                    "gmtModified": "2020-11-30 16:57:49",
                    "deleted": false,
                    "pid": "1333330082451472386",
                    "name": "添加用户",
                    "code": "btn.User.add",
                    "toCode": "",
                    "type": 2,
                    "status": null,
                    "level": 4,
                    "children": [],
                    "select": false
                  },
              
*/
export interface GetPermissionItem {
  id: string;
  pid: string; // 父级菜单id
  name: string;
  code: string; // 权限值
  toCode: string; // 跳转权限值
  type: number;
  // status: null;
  level: number;
  children: GetPermissionList;
  select: boolean;
}
/*
{
  "children": [
    {}
  ],
  "code": "string",
  "deleted": false,
  "gmtCreate": "2022-10-28T01:55:31.497Z",
  "gmtModified": "2022-10-28T01:55:31.497Z",
  "id": "string",
  "level": 0,
  "name": "string",
  "pid": "string",
  "select": true,
  "status": 0,
  "toCode": "string",
  "type": 0
}
*/
export type SavePermissionParams = Omit<
  GetPermissionItem,
  "id" | "children" | "select" | "toCode"
>;
export type GetPermissionList = GetPermissionItem[];
export interface GetPermissionListResponse {
  children: GetPermissionList;
}
